package com.service.sys;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.entity.sys.SysUserRole;
import com.mapper.sys.SysUserRoleMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户角色关联 服务实现类
 */
@Service
public class SysUserRoleService extends ServiceImpl<SysUserRoleMapper, SysUserRole> {

    public int insertBatch(List<SysUserRole> list){
        return baseMapper.insertBatch(list);
    }

    /**
     * 根据用户id获取角色id列表
     */
    public List<SysUserRole.UserRoleVo> getRoleByUserId(String userId){
        return baseMapper.getRoleByUserId(userId);
    }
}
